﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OPCDADemo.Model
{
    class MainWindowModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private string strTxtBoxMan;
        public MainWindowModel()
        {
            strlistPrtInfo = new List<string>();
            strPrtInfo = "";
        }
        /// <summary>
        /// 手动选择框内的Item名
        /// </summary>
        public string StrTxtBoxMan
        {
            get { return strTxtBoxMan; }
            set
            {
                strTxtBoxMan = value;
                if (this.PropertyChanged != null)
                {
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("StrTxtBoxMan"));
                }
                
            }
        }
        private List<string> strlistPrtInfo;
        public List<string> StrlistPrtInfo
        {
            get { return strlistPrtInfo; }
            set
            {
                strlistPrtInfo = value;
                if (this.PropertyChanged != null)
                {
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("StrlistPrtInfo"));
                }
            }
        }
        private string strPrtInfo;
        public string StrPrtInfo
        {
            get { return strPrtInfo; }
            set
            {
                strPrtInfo = value;
                if(this.PropertyChanged != null)
                {
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("StrPrtInfo"));
                }
            }

        }

        private string strGrpName;
        public string StrGrpName
        {
            get { return strGrpName; }
            set
            {
                strGrpName = value;
                if (this.PropertyChanged != null)
                {
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("StrGrpName"));
                }
            }
        }

        private string strWriteValue;
        public string StrWriteValue
        {

            get { return strWriteValue; }
            set
            {
                strWriteValue = value;
                if (this.PropertyChanged != null)
                {
                    this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs("StrWriteValue"));
                }
            }
        }

    }
}
